package com.mybar.subject.domain.service.impl;

import java.time.ZonedDateTime;
import com.alibaba.fastjson.JSON;
import com.mybar.subject.domain.convert.SubjectCategoryConvert;
import com.mybar.subject.domain.entity.SubjectCategoryBO;
import com.mybar.subject.domain.service.SubjectCategoryDomainService;
import com.mybar.subject.infer.basic.entity.SubjectCategory;
import com.mybar.subject.infer.basic.service.SubjectCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
@Slf4j
public class SubjectCategoryDomainServiceimpl implements SubjectCategoryDomainService {
    @Resource
    private SubjectCategoryService subjectCategoryService;


    @Override
    public void add(SubjectCategoryBO subjectCategoryBO) {
        if (log.isDebugEnabled()){
            log.info("SubjectCategoryController.add.bo:{}", JSON.toJSONString(subjectCategoryBO));
        }
        SubjectCategory subjectCategory = SubjectCategoryConvert.INSTANCE.convertBoToCategory(subjectCategoryBO);
        subjectCategoryService.insert(subjectCategory);


    }
    //ZonedDateTime now = ZonedDateTime.now();
}
